﻿@model IEnumerable<BookStore.Models.CartItems>
@{
    Layout = "~/Views/Shared/_SubLayout.cshtml";
    ViewBag.Title = "Shoping Cart";
}
<h2>
    My Shopping Cart</h2>
<table id ="Cart" class="tablesorter" cellspacing="0" width="95%" cellpadding="6" border="0">
    <thead>
        <tr>
            <th class="header headerSortUp" width="5%" align="center">
            </th>
            <th class="header" align="left" width="55%">
                PRODUCT NAME
            </th>
            <th class="header" align="left" width="10%">
                Price
            </th>
            <th class="header" width="10%" align="left">
                Qty
            </th>
            <th class="header" width="15%" align="left">
                Amount
            </th>
        </tr>
    </thead>
    <tbody> 
    @foreach (var item in ViewBag.CartItems)
    {    
        <tr class="even">
            <td width="5%" align="center">
                <a href="@Url.Action("Delete", "ShoppingCart", new { ItemID = item.CartID })">
                    <img src="@Url.Content("~/Content/Images/cross.jpg")" alt="" title="" />
                </a>
            </td>
            <td align="left" width="55%">
                @item.BookName
            </td>
            <td width="10%" align="center">
                @item.Price
            </td>
            <td width="10%" align="center">
                @item.Qty
            </td>
            <td width="15%" align="right">
                @string.Format("{0:C}", item.Amount)
            </td>
        </tr>
    }
    </tbody>
</table>
